import request from "@/utils/request";

export function addQuestion(data) {
  return request({
    url: `/core/quesst/add`,
    method: "post",
    data,
  });
}
// 获取题目列表
export function getQuestionList(params) {
  return request({
    url: `/core/quesst/list`,
    method: "get",
    params,
  });
}
// 删除题目
export function deleteQuestionByIds(ids) {
  return request({
    url: `/core/quesst/delete/${ids}`,
    method: "delete",
  });
}
// 修改题目
export function editQuestion(data) {
  return request({
    url: `/core/quesst/edit`,
    method: "put",
    data,
  });
}
// 图片上传
export function uploadEdiorImg(file) {
  return request({
    url: `/core/minio/uploadonePic`,
    method: "post",
    data: file,
    headers: {
      "Content-Type": "multipart/form-data",
    },
  });
}
// 图片上传
// export function uploadEdiorImg(data) {
//   return request({
//     url: "/core/minio/uploadonePic",
//     method: "post",
//     data: data,
//   });
// }
